<?php

namespace App\Http\Resources\Mini\NoticeResource;

use Illuminate\Http\Resources\Json\ResourceCollection;

class NoticeClass extends ResourceCollection
{
    /**
     * Transform the resource into an array.
     *
     * @param \Illuminate\Http\Request $request
     * @return array
     */
    public function toArray($request)
    {

        return [
            'name' => $this->name,//公告标题
            'content' => $this->content,//公告内容
            "author" => $this->one_estate->username,//公告发布者
            "avatar" => $this->one_estate->avatar,//公告发布者
            'start_time' => $this->start_time,//
            'end_time' => $this->end_time,
            'create_time' => $this->create_time,
            'status' => $this->status
        ];

//            'total'        => $this->total(), // 数据总数
//            'per_page'     => $this->perPage(), // 每页数量
//            'current_page' => $this->currentPage(), // 当前页码


    }
}
